<form id="filterForm"  onsubmit="return sendQuery(this);" action="/admin/admin-users/index/" name="DataForm"></form>
<div id="adminBlock">
    <?php if (is_array($this->Info)) {
        ?>

        <div class="height12">&nbsp;</div>
        <table class="info-table">

            <?php echo $this->render('table_header.phtml') ?>

            <?php
            $admin_account = new Zend_Session_Namespace('admin_account');
            foreach ($this->Info as $user) {
                if ($admin_account->role_id === 1 || $user['id'] == $admin_account->id) {
                    ?>
                    <?php $info = str_replace(']', '', str_replace('[', '', json_encode($user))); ?>
                    <tr class="line1">
                        <?php foreach ($this->tableColumn as $tb_column) {
                            ?>
                            <?php
                            if ($tb_column['title'] == 'status') {
                                $it = $this->trans->_('status' . (string) $user[$tb_column['title']]);
                            } elseif ($tb_column['title'] == 'Change') {
                                $it = '<div style="text-align: center" class="action_block">';
                                if (Admin_Model_AclAdmin::isPerm('controller-action', 'admin-users_edit'))
                                    $it .= '<a href="javascript: void(0)" rel="get-ajax-data-user|' . $user['id'] . '|update|400" onclick="globalModule.getAction(this)"><img src="/img/icon_edit.gif" alt="edit" title="edit" /></a>';
                                if (Admin_Model_AclAdmin::isPerm('controller-action', 'admin-users_delete'))
                                    $it .= '<a class="removeLink" href="javascript: void(0)" onclick="globalModule.deleteRow(' . $user['id'] . ')"><img src="/img/icon_del.gif" alt="remove" title="remove" /></a></div>';
                            } elseif ($tb_column['title'] == 'country') {
                                $it = '<div style="text-align: center">' . $user[$tb_column['title']] . '</div>';
                            } elseif (gettype($user[$tb_column['title']]) != 'object') {
                                $it = (string) $user[$tb_column['title']];
                            } else {
                                $it = Admin_Model_Account::getRealTime($user[$tb_column['title']], $this->timezone, $this->locale);
                            }
                            ?>
                            <td <?php echo $this->mc->get("adminuser_" . $user['id']) ? 'style="color: #32cd32;font-weight: bold;" ' : "" ?>>
                                <?php
                                echo $it;
                                ?>


                            </td>
                        <?php } ?>
                    </tr>
                <?php }
            }
            ?>
            <tr class="bottom-line"><td colspan="<?php echo count($this->tableColumn) ?>"></td></tr>
        </table>


    <?php } else {
        ?>
        <div><?php echo $this->trans->_('rows_no_found'); ?></div>
<?php } ?>
</div>
<?php echo GetSnippets::addJsVar(); ?>